﻿using System.Text;
using System.Threading.Tasks;

namespace awaitTest1
{
    internal class Program
    {
        static async Task Main(string[] args)
        {
            string filename = @"d:\temp\1.txt";
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < 100000; i++)
            {
                sb.Append("Hello World");
            }

            await File.WriteAllTextAsync(filename, sb.ToString());

            string text = await File.ReadAllTextAsync(filename);
            Console.WriteLine(text);
        }
    }
}
